<template>
    <v-card
        height="440"
        style="margin-top:16px"
    >
        <v-card-title><h3>代办任务统计</h3></v-card-title>
        <v-card-text>
            <v-row>
                <v-col cols="12" md="7">
                    <ve-pie :data="chartData" height="400px"></ve-pie>
                </v-col>
                <v-col cols="12" md="4">
                    <ve-histogram :data="chartData_1"  height="400px"></ve-histogram>
                </v-col>
            </v-row>
        </v-card-text>
    </v-card>
</template>

<script>
import { defineComponent } from '@vue/composition-api'

export default defineComponent({
    name: 'simple',
    setup() {

    },
    data: function () {
      return {
        chartData: {},
        tableData: {}
      }
    },
    mounted() {
        this.get_rip_data()
    },
    methods: {
        get_rip_data(){
            let user = localStorage.getItem('username')
            let rip_data = {'name': user}
            this.$api.task.queryPriorityNum(rip_data).then(res=>{
                this.chartData = res.data.data
            })
            let table_data = {'name': user}
            this.$api.task.queryOriginNum(table_data).then(res=>{
                this.tableData = res.data.data
            })
        }
    }
})

</script>

<style scoped>
  .el-header{
    background-color: #1F5DEA;
    color: white;
    text-align: center;
    line-height: 60px;
    font-size: 24px;
  }
</style>

